Fix memory leak. gdk_event_put would make a copy of next_event, and
authorMiguel de Icaza <miguel@nuclecu.unam.mx>
Thu, 31 Dec 1998 04:43:36 +0000 (04:43 +0000)
committerArturo Espinosa <unammx@src.gnome.org>
Thu, 31 Dec 1998 04:43:36 +0000 (04:43 +0000)
1998-12-30  Miguel de Icaza  <miguel@nuclecu.unam.mx>

* gtk/gtkmain.c (gtk_main_do_event): Fix memory leak.
gdk_event_put would make a copy of next_event, and next_event was
not being freed.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkmain.c

index 884a8ff4b4d7a78a1605e20c9c74580593cdeba6..1e38d762ab0d2dfad492bcd338f083667fd84cd4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+1998-12-30  Miguel de Icaza  <miguel@nuclecu.unam.mx>
+
+       * gtk/gtkmain.c (gtk_main_do_event): Fix memory leak.
+       gdk_event_put would make a copy of next_event, and next_event was
+       not being freed.
+
 Wed Dec 30 18:39:21 CST 1998 Shawn T. Amundson <amundson@gtk.org>
 
        * Released GTK+ 1.1.11
@@ -9,7 +15,7 @@ Wed Dec 30 18:39:21 CST 1998 Shawn T. Amundson <amundson@gtk.org>
          gtk+.spec:
          docs/gtk-config.1:
          gtk/gtkfeatures.h.in: version=1.1.11
-
+       
 1998-12-29  Owen Taylor  <otaylor@srv-19-29.roc.ny.frontiernet.net>
 
        * gdk/gdkim.c (gdk_wcstombs): Fixed off-by-one
index 884a8ff4b4d7a78a1605e20c9c74580593cdeba6..1e38d762ab0d2dfad492bcd338f083667fd84cd4 100644 (file)
@@ -1,3 +1,9 @@
+1998-12-30  Miguel de Icaza  <miguel@nuclecu.unam.mx>
+
+       * gtk/gtkmain.c (gtk_main_do_event): Fix memory leak.
+       gdk_event_put would make a copy of next_event, and next_event was
+       not being freed.
+
 Wed Dec 30 18:39:21 CST 1998 Shawn T. Amundson <amundson@gtk.org>
 
        * Released GTK+ 1.1.11
@@ -9,7 +15,7 @@ Wed Dec 30 18:39:21 CST 1998 Shawn T. Amundson <amundson@gtk.org>
          gtk+.spec:
          docs/gtk-config.1:
          gtk/gtkfeatures.h.in: version=1.1.11
-
+       
 1998-12-29  Owen Taylor  <otaylor@srv-19-29.roc.ny.frontiernet.net>
 
        * gdk/gdkim.c (gdk_wcstombs): Fixed off-by-one
index 884a8ff4b4d7a78a1605e20c9c74580593cdeba6..1e38d762ab0d2dfad492bcd338f083667fd84cd4 100644 (file)
@@ -1,3 +1,9 @@
+1998-12-30  Miguel de Icaza  <miguel@nuclecu.unam.mx>
+
+       * gtk/gtkmain.c (gtk_main_do_event): Fix memory leak.
+       gdk_event_put would make a copy of next_event, and next_event was
+       not being freed.
+
 Wed Dec 30 18:39:21 CST 1998 Shawn T. Amundson <amundson@gtk.org>
 
        * Released GTK+ 1.1.11
@@ -9,7 +15,7 @@ Wed Dec 30 18:39:21 CST 1998 Shawn T. Amundson <amundson@gtk.org>
          gtk+.spec:
          docs/gtk-config.1:
          gtk/gtkfeatures.h.in: version=1.1.11
-
+       
 1998-12-29  Owen Taylor  <otaylor@srv-19-29.roc.ny.frontiernet.net>
 
        * gdk/gdkim.c (gdk_wcstombs): Fixed off-by-one
index 884a8ff4b4d7a78a1605e20c9c74580593cdeba6..1e38d762ab0d2dfad492bcd338f083667fd84cd4 100644 (file)
@@ -1,3 +1,9 @@
+1998-12-30  Miguel de Icaza  <miguel@nuclecu.unam.mx>
+
+       * gtk/gtkmain.c (gtk_main_do_event): Fix memory leak.
+       gdk_event_put would make a copy of next_event, and next_event was
+       not being freed.
+
 Wed Dec 30 18:39:21 CST 1998 Shawn T. Amundson <amundson@gtk.org>
 
        * Released GTK+ 1.1.11
@@ -9,7 +15,7 @@ Wed Dec 30 18:39:21 CST 1998 Shawn T. Amundson <amundson@gtk.org>
          gtk+.spec:
          docs/gtk-config.1:
          gtk/gtkfeatures.h.in: version=1.1.11
-
+       
 1998-12-29  Owen Taylor  <otaylor@srv-19-29.roc.ny.frontiernet.net>
 
        * gdk/gdkim.c (gdk_wcstombs): Fixed off-by-one
index 884a8ff4b4d7a78a1605e20c9c74580593cdeba6..1e38d762ab0d2dfad492bcd338f083667fd84cd4 100644 (file)
@@ -1,3 +1,9 @@
+1998-12-30  Miguel de Icaza  <miguel@nuclecu.unam.mx>
+
+       * gtk/gtkmain.c (gtk_main_do_event): Fix memory leak.
+       gdk_event_put would make a copy of next_event, and next_event was
+       not being freed.
+
 Wed Dec 30 18:39:21 CST 1998 Shawn T. Amundson <amundson@gtk.org>
 
        * Released GTK+ 1.1.11
@@ -9,7 +15,7 @@ Wed Dec 30 18:39:21 CST 1998 Shawn T. Amundson <amundson@gtk.org>
          gtk+.spec:
          docs/gtk-config.1:
          gtk/gtkfeatures.h.in: version=1.1.11
-
+       
 1998-12-29  Owen Taylor  <otaylor@srv-19-29.roc.ny.frontiernet.net>
 
        * gdk/gdkim.c (gdk_wcstombs): Fixed off-by-one
index 884a8ff4b4d7a78a1605e20c9c74580593cdeba6..1e38d762ab0d2dfad492bcd338f083667fd84cd4 100644 (file)
@@ -1,3 +1,9 @@
+1998-12-30  Miguel de Icaza  <miguel@nuclecu.unam.mx>
+
+       * gtk/gtkmain.c (gtk_main_do_event): Fix memory leak.
+       gdk_event_put would make a copy of next_event, and next_event was
+       not being freed.
+
 Wed Dec 30 18:39:21 CST 1998 Shawn T. Amundson <amundson@gtk.org>
 
        * Released GTK+ 1.1.11
@@ -9,7 +15,7 @@ Wed Dec 30 18:39:21 CST 1998 Shawn T. Amundson <amundson@gtk.org>
          gtk+.spec:
          docs/gtk-config.1:
          gtk/gtkfeatures.h.in: version=1.1.11
-
+       
 1998-12-29  Owen Taylor  <otaylor@srv-19-29.roc.ny.frontiernet.net>
 
        * gdk/gdkim.c (gdk_wcstombs): Fixed off-by-one
index 884a8ff4b4d7a78a1605e20c9c74580593cdeba6..1e38d762ab0d2dfad492bcd338f083667fd84cd4 100644 (file)
@@ -1,3 +1,9 @@
+1998-12-30  Miguel de Icaza  <miguel@nuclecu.unam.mx>
+
+       * gtk/gtkmain.c (gtk_main_do_event): Fix memory leak.
+       gdk_event_put would make a copy of next_event, and next_event was
+       not being freed.
+
 Wed Dec 30 18:39:21 CST 1998 Shawn T. Amundson <amundson@gtk.org>
 
        * Released GTK+ 1.1.11
@@ -9,7 +15,7 @@ Wed Dec 30 18:39:21 CST 1998 Shawn T. Amundson <amundson@gtk.org>
          gtk+.spec:
          docs/gtk-config.1:
          gtk/gtkfeatures.h.in: version=1.1.11
-
+       
 1998-12-29  Owen Taylor  <otaylor@srv-19-29.roc.ny.frontiernet.net>
 
        * gdk/gdkim.c (gdk_wcstombs): Fixed off-by-one
index 4429614456b435563bf3ba810c4efc64141d5262..468e18364729e50ac4c619d511c63baae2ae674a 100644 (file)
@@ -581,8 +581,11 @@ gtk_main_do_event (GdkEvent *event)
   
 
   if (next_event)
-    gdk_event_put (next_event);
-  next_event = NULL;
+    {
+      gdk_event_put (next_event);
+      gdk_event_free (next_event);
+      next_event = NULL;
+    }
 
   /* Find the widget which got the event. We store the widget
    *  in the user_data field of GdkWindow's.